
window.onload = function() {
  const noBtn = document.querySelector('.no');
  noBtn.addEventListener('mouseenter',e => {
    let currentfirst = e.target.style[0];
    let currentlast  = e.target.style[1];
    let nextfirst = '';
    let nextlast = '';
    if(currentfirst === 'right' && currentlast ==="bottom"){
      nextfirst = 'right'
      nextlast  = 'top'
    }else if(currentfirst === 'right' && currentlast === 'top'){
      nextfirst = "left"
      nextlast = "top"
    }else if(currentfirst === 'left' && currentlast === 'top') {
      nextfirst = "left";
      nextlast = 'bottom'
    }else {
      nextfirst = 'right'
      nextlast = 'bottom'
    }
    e.target.style = `${nextfirst}:0px;${nextlast}:0px`
  })
  const ptext = document.querySelector('#context');
  const likeBtn = document.querySelector('.like')
  likeBtn.addEventListener('click', e => {
    console.log(ptext)
    ptext.innerText = '好巧，我也是！！！！'
  })
}